home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 47
/
Aminet 47 (2002)(GTI - Schatztruhe)[Feb 2002].iso
/
Aminet
/
dev
/
lang
/
AmigaTalk.lha
/
intuition
/
BitMap.st
next >
Wrap
Text File
|
2000-09-27
|
2KB
|
93 lines
"---------------------------------------------------------------"
" BitMap Class implements control of Amiga BitMaps. "
" ------------------------------------------------------------- "
" Valid values for Flags are:"
" BMF_CLEAR = 1 "
" BMF_DISPLAYABLE = 2 "
" BMF_INTERLEAVED = 4 "
" BMF_STANDARD = 8 "
" BMF_MINPLANES = 16 "
" Test file:
bmap <- BitMap new
bmap setBitMapWidth: 540
bmap setBitMapHeight: 90
bmap setBitMapDepth: 8
bmap setBitMapFlags: 14
bmap makeBitMap
...
bmap remove
"
"---------------------------------------------------------------"
Class BitMap :Glyph ! address width height depth flags !
[
remove
<primitive 189 0 address>
|
getBitMapWidth
^ width <- <primitive 189 2 0 address>
|
getBitMapHeight
^ height <- <primitive 189 2 1 address>
|
getBitMapFlags
^ flags <- <primitive 189 2 2 address>
|
getBitMapDepth
^ depth <- <primitive 189 2 3 address>
|
changeBitMapWidth: newWidth
<primitive 189 3 0 newWidth address>.
width <- newWidth
|
changeBitMapHeight: newHeight
<primitive 189 3 1 newHeight address>.
height <- newHeight
|
changeBitMapFlags: newFlags
<primitive 189 3 2 newFlags address>.
flags <- newFlags
|
changeBitMapDepth: newDepth
<primitive 189 3 3 newDepth address>.
depth <- newDepth
|
readBitMapFile: bitMapFileName
<primitive 189 4 bitMapFileName address>.
width <- <primitive 189 2 0 address>.
height <- <primitive 189 2 1 address>.
flags <- <primitive 189 2 2 address>.
depth <- <primitive 189 2 3 address>.
^ self "????"
|
writeBitMapFile: bitMapFileName
<primitive 189 5 bitMapFileName address>
|
grabScreenPiece: filename x: xval y: yval w: wval h: hval
<primitive 189 6 filename xval yval wval hval>
|
setBitMapWidth: newWidth
width <- newWidth
|
setBitMapHeight: newHeight
height <- newHeight
|
setBitMapFlags: newFlags
flags <- newFlags
|
setBitMapDepth: newDepth
depth <- newDepth
|
makeBitMap
address <- <primitive 189 1 width height depth>.
^ self
|
new
^ self
]